<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $title?></title>
<link rel="stylesheet" href="${staticServer}/inc/css/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/css/page.css" />
<link rel="stylesheet" href="${staticServer}/css/ask.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/htmlfilter.js"></script>
<script src="${staticServer}/inc/js/tips.js"></script>
<script src="${staticServer}/js/t/user_allot.js?1.2"></script>
</head>
<script>
$(function(){
	$("#sp_user_ipt").keyup(function(){
		var nickname = $("#sp_user_ipt").val();
		$.post("${contextPath}/admin/getUserBynickname.json", {
			"nickname" : nickname
		}, function(ms) {
			 if(ms.user!=null){
			 	var username = ms.user.username;
			 	$("#user").val(username);
			 }
			
		});
	});
});
</script>
<body>
<input type="hidden" id="voteId" value="<#if vote??>${vote.id}</#if>">
<input type="hidden" id="clientkey" value="<#if clist??>${clist.keyname}</#if>" >

	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>问卷</li>
			<li>&gt;</li>
			<li class="current"></li>
		</ul>
	</div>
	<div id="caption">
		<ul>
			<li><span class="title">操作提示：</span></li>
			<li><span class="quote">Ctrl+Enter</span> 提交保存</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table id="tbl_article">
			<tr>
				<th width="25%">分类
				<td width="75%"><#if vote??>${vote.type}</#if></td>
			</tr>
			<tr>
				<th width="25%">孩子年龄</th>
				<td width="75%"><#if vote??>${vote.age}岁</#if></td>
			</tr>
			<tr>
				<th width="25%">所在城市</th>
				<td width="75%"><#if vote??>${vote.city}</#if></td>
			</tr>
			<tr>
				<th width="25%">联系方式</th>
				<td width="75%"><#if vote??><#if vote.phone?? && vote.phone!="">电话：${vote.phone}</#if><#if vote.email?? && vote.email!="">-邮箱：${vote.email}</#if><#if vote.qq?? && vote.qq!="">-QQ:${vote.qq}</#if></#if>
				<div class='rect'>
					<#if clist??>
					<#list clist as client>
					 <#if !client_has_next>
						<span class='quote'>提示：该联系方式在OA客户资源库中已经存在，请分配给相同的负责人，免于冲突。</span><br>
						<p class='line'></p>
						<b>客户名称/称呼：</b>${client.nickname}<br>
						<b>联系方式：</b>电话：${client.phone} - 邮箱：${client.email} - QQ：${client.qq}<br>
						<b>登记人：</b>${client.ueuser}<br>
						<b>负责人：</b><#if client.rawuser!="">${client.rawuser}<#else>${client.name}</#if> <a id='btnSelect' rel="<#if client.rawuser!="">${client.rawuser}<#else>${client.name}</#if>">[ 选为目标咨询师 ]</a><br>
					  </#if>
					</#list>
					<#else>
						<b style="color:red;">提示： 该联系方式在OA客户资源库中没有匹配。</b>
					</#if>
				</div></td>
			</tr>
			<tr>
				<th width="25%">IP 地址</th>
				<td width="75%"><code><#if vote??>${vote.ip}</#if></code>
					<p class="line"></p>
					<p class="caption">此IP地址由系统在用户提交信息，自动分析所得，仅作参考</p></td>
			</tr>
			<tr>
				<th width="25%">目标咨询师</th>
				<td width="75%">
					<select id="user">
						<option value="">-- 请选择目标 --</option>
						<#if uList??>
							<#list uList as list>
								<option value="${list.username}">${list.nickname}（${list.regions}-${list.departments}-${list.job}）</option>
							</#list>
						</#if>
						<#if uList1??>
							<#list uList1 as list>
								<option value="${list.username}">${list.nickname}（${list.regions}-${list.departments}-${list.job}）</option>
							</#list>
						</#if>
					</select>
					<input type="text" id="sp_user_ipt" size="12" maxlength="10" placeholder="输入快捷匹配">
					<p class="line"></p>
					<p class="caption">将该问卷所属的客户资源分配给指定的咨询师进行后续业务跟进，该操作不可撤消且只能进行一次</p>
				</td>
			</tr>
			<tr>
				<th>备注信息</th>
				<td><div id="desc" contenteditable="true"><#if vote??>${vote.descs}</#if></div>
					<p class="line"></p>
					<p class="caption">仅供后台标记、备注相关信息使用（会在查询列表中显示该备注）</p></td>
			</tr>
		</table>
		<div class="remark">
			<ul>
				<li><span class="title">注意事项：</span></li>
				<li>1、咨询师分配操作只能进行一次，且不可撤消（后续若需另外指定其它咨询需要在OA系统中进行客户转交）</li>
				<li>2、备注信息一般用来标记和指示分配相关的信息，可修改多次</li>
			</ul>
		</div>
		<div>
			<input type="hidden" id="key" value="<?php echo $r['key']?>" />
		</div>
		<div id="controlbar">
			<input id="btnSubmit" type="button" class="submit" value="  提交分配方案  " />
			<input id="btnCancel" type="button" class="submit" value="  返回列表  " onclick="history.back()" />
		</div>
	</div>
</body>
</html>

